Comment: Default Setup Project
Set Variable INSTALLSQL to 
 
[DEFINE REGION: Application Updates]
[END REGION]
 
[DEFINE REGION: Check Application Requirements]
Get System Setting 32 MB Physical Memory into CHECKSYSTEM
if Variable CHECKSYSTEM not Equals TRUE
  MessageBox: $TITLE$ Setup Error, This product requires at least 32 MB Physical Memory.$NEWLINE$$NEWLINE$Setup cannot continue.
  Terminate Installation
end
Get System Setting Internet Explorer 6.0 Service Pack 1 into CHECKSYSTEM
if Variable CHECKSYSTEM not Equals TRUE
  MessageBox: $TITLE$ Setup Error, This product requires at least Internet Explorer 6.0 Service Pack 1.$NEWLINE$$NEWLINE$Setup cannot continue.
  Terminate Installation
end
Get System Setting Windows 7 into CHECKSYSTEM
if Variable CHECKSYSTEM not Equals TRUE
  MessageBox: $TITLE$ Setup Error, This product requires at least Windows 7.$NEWLINE$$NEWLINE$Setup cannot continue.
  Terminate Installation
end
[END REGION]
 
[DEFINE REGION: Check/Install Application Pre-Requisites]
Set Variable IS64BIT to 
Get System Setting Windows in 64 bit Mode into IS64BIT
Set Variable OperatingSystem to 
Get Exact OS Level into OperatingSystem
Set Variable ServicePack to 
Get Exact SP Level into ServicePack
Set Variable CompatSQL2012 to FALSE
if Variable OperatingSystem Equals SERVER8R2
  Set Variable CompatSQL2012 to TRUE
end
if Variable OperatingSystem Equals SERVER8
  Set Variable CompatSQL2012 to TRUE
end
if Variable OperatingSystem Equals 2008R2
  Get System Setting Service Pack 1 into ServicePack
  if Variable ServicePack Equals TRUE
    Set Variable CompatSQL2012 to TRUE
  end
end
if Variable OperatingSystem Equals METRO
  Set Variable CompatSQL2012 to TRUE
end
if Variable OperatingSystem Equals SEVEN
  Get System Setting Service Pack 1 into ServicePack
  if Variable ServicePack Equals TRUE
    Set Variable CompatSQL2012 to TRUE
  else
    MessageBox: $TITLE$ Setup, Application requires Windows 7 Service Pack 1.$NEWLINE$$NEWLINE$$ERROROLD$
    Terminate Installation
  end
end
if Variable OperatingSystem Equals 2008
  Get System Setting Service Pack 2 into ServicePack
  if Variable ServicePack Equals TRUE
    Set Variable CompatSQL2012 to TRUE
  end
end
 
[DEFINE REGION: Check Application Pre-Requisites]
Comment: Check setup pre-requisites
Set Variable PREREQ to FALSE
Set Variable PRELIST to 
[compiler if Variable BUILDMODE not Equals PATCH]
if Variable NEEDSUPGRADE Equals TRUE
  Set Variable PREREQ to TRUE
  Set Variable PRELIST to $PRELIST$$NEWLINE$Previous Version Uninstallation
end
Include Script: checkmsi30
Include Script: checkmsi31
if Variable IS64BIT Equals FALSE
  Include Script: checkmsxml60
  Include Script: checkmsi45
  Include Script: checknet20
  Include Script: checknet2sp2
  Include Script: checknet30
  Include Script: checknet3sp2
  Include Script: checknet351
  Include Script: checknet4aip_client_x86
  Include Script: checknet4aip_x86
  Include Script: checkcrystal135
  if Variable CompatSQL2012 Equals FALSE
  else
    Include Script: checkdenali_x86
  end
else
  Include Script: checkmsxml60_x64
  Include Script: checkmsi45_x64
  Include Script: checknet20_x64
  Include Script: checknet20sp2_x64
  Include Script: checknet30_x64
  Include Script: checknet30sp2_x64
  Include Script: checknet35sp1_x64
  Include Script: checknet4aip_client_x64
  Include Script: checknet4aip_x64
  Include Script: checkcrystal135_x64
  if Variable CompatSQL2012 Equals FALSE
  else
    Include Script: checkdenali_x64
  end
end
[compiler end]
[END REGION]
 
[DEFINE REGION: Install Application Pre-Requisites]
Comment: Install setup pre-requisites
if Variable PREREQ not Equals FALSE
  Display Dialog: prereq, wait for dialog to return (modal)
  if Variable WIZARD Equals CANCEL
    Terminate Installation
  end
  Display Dialog: progressprereq, use as progress dialog (non-modal)
  [compiler if Variable BUILDMODE not Equals PATCH]
  if Variable NEEDSUPGRADE Equals TRUE
    Set Variable REMOVEOLD to 
    Set Variable ERROROLD to 
    Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
    if Variable REMOVEOLD Equals ERROR
      MessageBox: $TITLE$ Setup, Unable to uninstall old version of $TITLE$. Please uninstall it yourself using Control Panel Add-Remove Programs before attempting to install this product.$NEWLINE$$NEWLINE$$ERROROLD$
      Terminate Installation
    end
    if Variable REMOVEOLD Equals REBOOT
      MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
      if Variable REBOOTNOW Equals OK
        Reboot Computer and Resume Setup
      else
        Terminate Installation
      end
    end
    Set Variable MAINTENANCE to FALSE
  end
  [DEFINE WEB MEDIA Microsoft .NET Framework 2.0 with Service Pack 2 (x64), Exclude from Build]
  Include Script: setupnet20sp2_x64
  [DEFINE WEB MEDIA Microsoft XML Parser 6.0 (x64), Exclude from Build]
  Include Script: setupmsxml60_x64
  [DEFINE WEB MEDIA Microsoft .NET Framework 3.0 (x64), Exclude from Build]
  Include Script: setupnet30_x64
  [DEFINE WEB MEDIA Microsoft .NET Framework 3.0 Service Pack 2 (x64), Exclude from Build]
  Include Script: setupnet30sp2_x64
  [DEFINE WEB MEDIA Microsoft .NET Framework 3.5 with Service Pack 1 (x64), Exclude from Build]
  Include Script: setupnet35sp1_x64
  [DEFINE WEB MEDIA Microsoft Windows Installer 3.0, Exclude from Build]
  Include Script: setupmsi30
  [DEFINE WEB MEDIA Microsoft Windows Installer 3.1, Exclude from Build]
  Include Script: setupmsi31
  [DEFINE WEB MEDIA Microsoft .NET Framework 2.0 with Service Pack 2, Exclude from Build]
  Include Script: setupnet2sp2
  [DEFINE WEB MEDIA Microsoft XML Parser 6.0, Exclude from Build]
  Include Script: setupmsxml60
  [DEFINE WEB MEDIA Microsoft .NET Framework 3.0, Exclude from Build]
  Include Script: setupnet30
  [DEFINE WEB MEDIA Microsoft .NET Framework 3.0 Service Pack 2, Exclude from Build]
  Include Script: setupnet3sp2
  [DEFINE WEB MEDIA Microsoft .NET Framework 3.5 with Service Pack 1, Exclude from Build]
  Include Script: setupnet351
  if Variable IS64BIT Equals FALSE
    [DEFINE WEB MEDIA Microsoft .NET Framework 2.0, Exclude from Build]
    Include Script: setupnet20
    [DEFINE WEB MEDIA Microsoft Windows Installer 4.5, Exclude from Build]
    Include Script: setupmsi45
    [DEFINE WEB MEDIA Microsoft .NET Framework Client 4, Exclude from Build]
    Include Script: setupnet4aip_client_x86
    [DEFINE WEB MEDIA Microsoft .NET Framework 4, Exclude from Build]
    Include Script: setupnet4aip_x86
    [DEFINE WEB MEDIA Microsoft SQL Server Express 2012 (x86 and x64 WOW), Exclude from Build]
    Include Script: setupdenali_x86
    [DEFINE WEB MEDIA Crystal Reports Runtime for .NET SP5, Exclude from Build]
    Include Script: setupcrystal135
  else
    [DEFINE WEB MEDIA Microsoft .NET Framework 2.0 (x64), Exclude from Build]
    Include Script: setupnet20_x64
    [DEFINE WEB MEDIA Microsoft Windows Installer 4.5 (x64), Exclude from Build]
    Include Script: setupmsi45_x64
    [DEFINE WEB MEDIA Microsoft .NET Framework Client 4 (x64), Exclude from Build]
    Include Script: setupnet4aip_client_x64
    [DEFINE WEB MEDIA Microsoft .NET Framework 4 (x64), Exclude from Build]
    Include Script: setupnet4aip_x64
    [DEFINE WEB MEDIA Microsoft SQL Server Express 2012 (x64), Exclude from Build]
    Include Script: setupdenali_x64
    [DEFINE WEB MEDIA Crystal Reports Runtime for .NET SP5 (64bit), Exclude from Build]
    Include Script: setupcrystal135_x64
  end
  [compiler end]
  Hide Dialog
end
[END REGION]
 
[END REGION]
 
[DEFINE REGION: Define Setup Globals]
Comment: Define Setup Components
Define Component: Enterprise
 
Comment: Initialize Setup Globals
Get System Setting Windows NT Kernel (NT4, 2000, XP, 2003, Vista, 2008, 7, 2008 R2, 8, 2012) into ISNT
Get Common Folder Location System->Fonts Directory into ALLFONTS
Get Folder Location System->Program Files Directory into PROGRAMFILES
Get Common Folder Location System->Program Files Directory into COMMONFILES
Get Common Folder Location Start Menu->Programs Group into SHORTCUTFILESALL
Get Folder Location Start Menu->Programs Group into SHORTCUTFILES
if Variable SHORTCUTFILESALL Equals 
  Set Variable SHORTCUTFILESALL to $SHORTCUTFILES$
end
Get Folder Location System->Desktop Directory into DESKTOPDIR
Get Folder Location System->Windows Directory into WINDIR
Get Folder Location System->System Directory into WINSYSDIR
Get Folder Location Taskbar->Quick Launch Directory into QUICKLAUNCHDIR
Get Folder Location WWW->WWWRoot into WWWROOTDIR
[END REGION]
 
[DEFINE REGION: Setup User Interview]
if Variable MAINTENANCE Equals TRUE
  GoTo Label: Maintenance
else
  [compiler if Variable BUILDMODE not Equals PATCH]
  Comment: First Time Install
  Set Variable TARGETDIR to $PROGRAMFILES$\Palladium Software\
  Set Variable STARTMENU to $TITLE$
  [compiler end]
end
 
label: Welcome Dialog
Display Dialog: welcome, wait for dialog to return (modal)
if Variable WIZARD Equals CANCEL
  GoTo Label: Main Install
end
[compiler if Variable BUILDMODE not Equals PATCH]
label: License Check
Display Dialog: licensecheck, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Welcome Dialog
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: ReadMe Information
Display Dialog: readme, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: License Check
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: User Registration
Comment: Display Dialog: registration, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: ReadMe Information
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: Setup Type
Comment: Display Dialog: setuptype, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: User Registration
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
Comment: TO-DO: Customize your minimum setup here
if Variable MINIMUM Equals TRUE
  Deselect Component: Enterprise
else
  if Variable COMPLETE Equals TRUE
    Select Component: Enterprise
  end
end
label: Custom Setup
Comment: Display Dialog: componentstree (if variable PERSONALIZED is TRUE), wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Setup Type
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: Destination Directory
Display Dialog: destination, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Custom Setup
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: Start Menu
Comment: Display Dialog: startmenu, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Destination Directory
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
[compiler end]
label: Start Installation
Display Dialog: startinstallation, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  [compiler if Variable BUILDMODE not Equals PATCH]
  GoTo Label: Start Menu
  [compiler else]
  GoTo Label: Welcome Dialog
  [compiler end]
else
  GoTo Label: Main Install
end
 
label: Maintenance
Comment: Maintenance Install/Uninstall
wizard loop
Display Dialog: maintenance, wait for dialog to return (modal)
Comment: Display Dialog: componentstree (if variable MODIFY is TRUE), wait for dialog to return (modal)
Display Dialog: startinstallation, wait for dialog to return (modal)
end
[END REGION]
 
[DEFINE REGION: Process (Un)Installation]
label: Main Install
Comment: Exit Setup if Wizard Loop cancelled
if Variable WIZARD Equals CANCEL
  Terminate Installation
end
 
Comment: Prepare to install
Set Variable PROGRESSTEXT to Installing $TITLE$
Set Variable SUCCESS to 
Set Variable LASTERROR to 
if Variable ALLUSERS Equals TRUE
  Set Variable SHORTCUTFOLDER to $SHORTCUTFILESALL$\$STARTMENU$
else
  Set Variable SHORTCUTFOLDER to $SHORTCUTFILES$\$STARTMENU$
end
Display Dialog: progress, use as progress dialog (non-modal)
 
Comment: Modify Target System
[DEFINE REGION: Perform Uninstallation]
if Variable REMOVE Equals TRUE
  Comment: Uninstall product
  Comment: TO-DO: Insert any additional uninstall commands here
  Apply Uninstall (get result into variable SUCCESS)
  Set Variable PROGRESS to 100
else
  [END REGION]
  [DEFINE REGION: Perform First Time or Maintenance Installation]
  [OFFLINE CONTENT]
  Install Files C:\EnterpriseFiles\Palladium Enterprise 2014\*.* to $TARGETDIR$\Palladium Enterprise 2014, include subfolders
  [DEFINE WEB MEDIA Enterprise]
  Get Component Enterprise Selection State into Variable SELECTED
  if Variable SELECTED Equals TRUE
    Create Folder $PROGRAMFILES$\SAP BusinessObjects
    Create Folder $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0
    Create Folder $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common
    Create Folder $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0
    Create Folder $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86
    Create Folder $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64
    Create Folder $WINDIR$\System32
    Create Folder $WINDIR$\SysWOW64
    Install Files C:\Palladium\Fonts\Code39AzaleaNarrow1.ttf to $ALLFONTS$
    Install Files C:\Palladium\Fonts\Code39AzaleaNarrow2.ttf to $ALLFONTS$
    Install Files C:\Palladium\Fonts\Code39AzaleaNarrow3.ttf to $ALLFONTS$
    Install Files C:\Palladium\Fonts\Code39AzaleaRegular1.ttf to $ALLFONTS$
    Install Files C:\Palladium\Fonts\Code39AzaleaRegular2.ttf to $ALLFONTS$
    Install Files C:\Palladium\Fonts\Code39AzaleaRegular3.ttf to $ALLFONTS$
    Install Files C:\Palladium\Fonts\Code39AzaleaWide1.ttf to $ALLFONTS$
    Install Files C:\Palladium\Fonts\Code39AzaleaWide2.ttf to $ALLFONTS$
    Install Files C:\Palladium\Fonts\Code39AzaleaWide3.ttf to $ALLFONTS$
    Install Files C:\Palladium\Fonts\32bit\u212azalea.dll to $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86
    Install Files C:\Palladium\Fonts\32bit\u25azalea.dll to $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86
    Install Files C:\Palladium\Fonts\64bit\u25azalea.dll to $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64
    Install Files C:\Palladium\Fonts\64bit\u212azalea64.dll to $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64
    Install Files C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\cxlib-5-0.dll to $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64
    Install Files C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\cxlibw-5-0.dll to $PROGRAMFILES$\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64
    Install Files C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\cxlib-5-0.dll to $WINDIR$\System32
    Install Files C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\cxlibw-5-0.dll to $WINDIR$\System32
    Install Files C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\cxlib-5-0.dll to $WINDIR$\SysWOW64
    Install Files C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\cxlibw-5-0.dll to $WINDIR$\SysWOW64
    Get Folder Location Start Menu->Start Menu Group into SHORTCUTROOT
    Create Shortcut $SHORTCUTROOT$\Palladium Enterprise to $PROGRAMFILES$\Palladium Software\Palladium Enterprise 2014\Palladium Enterprise.exe
    Create Shortcut $SHORTCUTFOLDER$\Palladium Enterprise to $PROGRAMFILES$\Palladium Software\Palladium Enterprise 2014\Palladium Enterprise.exe
    Create Shortcut $DESKTOPDIR$\Palladium Enterprise to $PROGRAMFILES$\Palladium Software\Palladium Enterprise 2014\Palladium Enterprise.exe
    Install Files C:\EnterpriseFiles\Fonts\u25azalea.dll to $PROGRAMFILES$\Business Objects\BusinessObjects Enterprise 12.0\win32_x86
    Set Variable Autocon to 
    Get Exact OS Level into Autocon
    if Variable Autocon not Equals XP
      Install Files C:\EnterpriseFiles\EntServSet13.xml to C:\ProgramData\Palladium
    else
      Install Files C:\EnterpriseFiles\EntServSet13.xml to C:\Documents and Settings\All Users\Application Data\Palladium
    end
  end
  [OFFLINE CONTENT]
  if Variable SELECTED Equals TRUE
  end
  Comment: TO-DO: Insert any additional install commands here
  Install Fonts from '$SUPPORTDIR$\Fonts\*.ttf'
  [compiler if Variable BUILDMODE Equals PATCH]
  Apply Patch (get result into variable SUCCESS)
  [compiler else]
  if Variable ADVERTISE Equals TRUE
    Apply Advertised (get result into variable SUCCESS)
  else
    Apply Install (get result into variable SUCCESS)
    if Variable SUCCESS not Equals ERROR
      if Variable SUCCESS not Equals CANCEL
      end
    end
  end
  [compiler end]
  Set Variable PROGRESS to 100
end
[END REGION]
[END REGION]
 
[DEFINE REGION: Finish Setup]
Comment: End of Installation
Hide Dialog
Display Dialog: finish, wait for dialog to return (modal)
if Variable SILENT Equals FALSE
  if Variable REBOOTCOMPUTER Equals TRUE
    if Variable SUCCESS Equals REBOOT
      Reboot Computer
    end
  end
  if Variable RUNAPP Equals TRUE
    if Variable REMOVE Equals FALSE
      if Variable SUCCESS Equals COMPLETE
        Comment: TO-DO: Insert command that starts your application here
      end
    end
  end
end
[END REGION]
 
